home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1998 February / Macworld (1998-02).dmg / Inside Macworld / Alphamania 2 & Effector Sets / AlphaMania 2 / methods and modes.dir / 00018.ls < prev    next >
Encoding:
Text File  |  1997-12-19  |  1.2 KB  |  42 lines

  1. on Init
  2.   global kCandyHeartSprite, kCandyStartPoint
  3.   set kCandyHeartSprite to 15
  4.   set the drawMethod of member "candyheart" to #normal
  5.   set kCandyStartPoint to point(the locH of sprite kCandyHeartSprite, the locV of sprite kCandyHeartSprite)
  6.   UpdateOutput("normal")
  7. end
  8.  
  9. on VerifyEffect fxSym
  10.   set fxList to GetListOfAllEffects(member "candyheart")
  11.   return getPos(fxList, fxSym)
  12. end
  13.  
  14. on UpdateOutput fName
  15.   set the textStyle of member "output" to "plain"
  16.   put field fName into field "output"
  17.   set the textStyle of member "output" to "plain"
  18. end
  19.  
  20. on CenterSprite
  21.   global kCandyStartPoint, kCandyHeartSprite
  22.   set the locH of sprite kCandyHeartSprite to the locH of kCandyStartPoint
  23.   set the locV of sprite kCandyHeartSprite to the locV of kCandyStartPoint
  24.   updateStage()
  25. end
  26.  
  27. on StylizeOutput
  28.   set hit1 to "the sourceMember"
  29.   set hit2 to "the sourcePosition"
  30.   ScanAndBold("output", hit1)
  31.   ScanAndBold("output", hit2)
  32. end
  33.  
  34. on ScanAndBold fName, hit
  35.   if field fName contains hit then
  36.     set whereStart to offset(hit, field fName)
  37.     if whereStart then
  38.       set the textStyle of char whereStart to whereStart + length(hit) of field fName to "bold"
  39.     end if
  40.   end if
  41. end
  42.